<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>南瓜课堂- 传道 · 授业 · 解惑</title>
    <meta name="Keywords" content="关键词,关键词">
    <meta name="description" content="">
    <link rel="shortcut icon" type="image/x-icon" href="/static/image/logo/pinSlogo.png"/>
    <script type="text/javascript" src="/static/js/jquery-1.8.3.js"></script>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <link rel="stylesheet" type="text/css" href="/static/css/teachercenter/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/css/teachercenter/animate.css">
    <link rel="stylesheet" type="text/css" href="/static/css/teachercenter/style.css">
    <link rel="stylesheet" href="/static/css/main.css">
    <link rel="stylesheet" type="text/css" href="/static/js/teachercenter/plugins/queryCity/css/cityLayout.css">
    <script src="/static/js/teachercenter/jquery.min.js" type="text/javascript"></script>
    <script src="/static/js/teachercenter/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="/static/layui/css/layui.css"  media="all">

</head>
<body>

<!--E 头部样式-->
<div class="header">

    <div class="h_top">

        <!--S logo-->
        <div class="h_logo">
            <a href="#"><img src="/static/image/logo/1.png" alt="南瓜课堂" width="145" height="38"/></a>
            <!--S 所有列表 -->
        </div>

        <!--E logo-->

        <!--S 头部导航-->
        <div class="h_nav">
            <ul>
                <li>
                    <a href="index.html">首页</a>
                </li>
                <li>
                    <a href="#">全部课程</a>
                </li>
                <li>
                    <a href="#teacher">讲师团队</a>
                </li>
                <li>
                    <a href="#">讲师入驻</a>
                </li>
                <li>
                    <a href="#">VIP</a>
                </li>
            </ul>
        </div>
        <!--E 头部导航-->

        <!--S 搜索框-->
        <div class="h_search">
            <input type="text" class="h_text"/>
            <a href="#" class="h_btn"></a>
        </div>
        <!--E 搜索框-->

        <!--S 消息   个人中心-->
        <div class="h_message">
            <div class="h_info">
                <a href="#" target="_blank"></a>
                <i></i>
            </div>
            <!--个人中心-->
            <div class="h_pic">
                <a class="h_log" href="#">登录/注册</a>

            </div>
        </div>
        <!--E 消息   个人中心-->
    </div>

</div>
<div class="kong"></div>
<!--E 头部样式-->

<section>
    <div class="wp">
        <ul class="crumbs">
            <li><a href="index.html">首页</a>></li>
            <li><a href="org-list.html">课程机构</a>></li>
            <li>机构课程</li>
        </ul>
    </div>
</section>

<section>





    <div class="wp list personal_list comp">
        <div class="" style="width: 200px;display: inline-block;">
            <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="demo" style="margin-right: 10px;">
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:;">全部直播</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" onclick="getAllBroadcast(this,4)">正在直播</a></dd>
                        <dd><a href="javascript:;" onclick="getAllBroadcast(this,1)">未直播</a></dd>
                        <dd><a href="javascript:;" onclick="getAllBroadcast(this,2)">已直播</a></dd>
                        <dd><a href="javascript:;" onclick="getAllBroadcast(this,3)">已直播</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">我的视频</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">收费视频</a></dd>
                        <dd><a href="javascript:;">免费视频</a></dd>
                        <dd><a href="javascript:;">电商平台</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="">云市场</a></li>
                <li class="layui-nav-item"><a href="">社区</a></li>
            </ul>
        </div>




        <div class="right companycenter layout" style="display: inline-block"   >
            <div class="head">
                <h1>机构课程</h1>
            </div>

            <table class="layui-table" lay-data="{width: 892, height:330, url:'/demo/table/user/', page:true, id:'idTest'}" lay-filter="demo">
                <thead>
                <tr>
                    <th lay-data="{type:'checkbox', fixed: 'left'}"></th>
                    <th lay-data="{field:'id', width:80, sort: true, fixed: true}">ID</th>
                    <th lay-data="{field:'username', width:80}">用户名</th>
                    <th lay-data="{field:'sex', width:80, sort: true}">性别</th>
                    <th lay-data="{field:'city', width:80}">城市</th>
                    <th lay-data="{field:'sign', width:160}">签名</th>
                    <th lay-data="{field:'experience', width:80, sort: true}">积分</th>

                    <th lay-data="{field:'classify', width:80}">职业</th>
                    <th lay-data="{field:'wealth', width:135, sort: true}">财富</th>
                    <th lay-data="{field:'score', width:80, sort: true, fixed: 'right'}">评分</th>
                    <th lay-data="{fixed: 'right', width:178, align:'center', toolbar: '#barDemo'}"></th>
                </tr>
                </thead>
            </table>

            <script type="text/html" id="barDemo">
                <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
            </script>
            
        </div>


</section>
<!--sidebar start-->
<section>
    <ul class="sidebar">
        <li class="qq">
            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2023525077&site=qq&menu=yes"></a>
        </li>
        <li class="totop"></li>
    </ul>
</section>
<!--sidebar end-->
<!--header start-->
</div>


<!--footer start-->
<div class="footer">
    <div class="f_con">
        <div class="f_desc">
            <dl>
                <dt>关于南瓜</dt>
                <dd>
                    <a href="#">了解南瓜</a>
                </dd>
                <dd>
                    <a href="#">加入南瓜</a>
                </dd>
                <dd>
                    <a href="#">联系我们</a>
                </dd>
            </dl>

            <dl>
                <dt>学习资讯</dt>
                <dd>
                    <a href="#">学院课程</a>
                </dd>
                <dd>
                    <a href="#">就业指南</a>
                </dd>
            </dl>

            <dl>
                <dt>服务中心</dt>
                <dd>
                    <a href="#">安卓APP</a>
                </dd>
                <dd>
                    <a href="#">IOS APP</a>
                </dd>
            </dl>

            <dl>
                <dt>关注我们</dt>
                <dd>
                    <a href="#" class="share f_wb"></a>
                    <a href="#" class="share f_qq"></a>
                </dd>
            </dl>

        </div>

        <div class="f_tel">
            <div class="f_qrcode">
                <img src="/static/image/weixin.png" alt="南瓜官方微信" width="102" height="127"/>
            </div>
            <div class="f_time">
                <p class="f_phone">400-009-6359</p>
                <p class="f_price">
                    <span>周一至周六 9:30-23:00</span>
                    <span>（仅收市话费）</span>
                </p>
                <p class="f_mm">24小时在线客服</p>
            </div>
        </div>
        <div class="clear"></div>
    </div>

</div>
<!--end footer-->

<!--copyright start-->
<div class="copyright">
    Copyright &copy; 2013-2014 www.mooncollege.cn All Rights Reserved 版权所有：南瓜课堂教育咨询有限公司 备案号：备13016338号
</div>
<!--end copyright-->


<!--弹出省省市-->
<script src="/static/js/teachercenter/selectUi.js" type='text/javascript'></script>
<script type="text/javascript" src="/static/js/teachercenter/plugins/laydate/laydate.js"></script>
<script src="/static/js/teachercenter/plugins/layer/layer.js"></script>
<script src="/static/js/teachercenter/plugins/queryCity/js/public.js" type="text/javascript"></script>

<script type="text/javascript" src="/static/js/teachercenter/plugins/jquery.raty.js"></script>
<script type="text/javascript">
    //收藏分享
    //收藏分享
    function add_fav(current_elem, fav_id, fav_type) {
        $.ajax({
            cache: false,
            type: "POST",
            url: "/org/add_fav/",
            data: {'fav_id': fav_id, 'fav_type': fav_type},
            async: true,
            beforeSend: function (xhr, settings) {
                xhr.setRequestHeader("X-CSRFToken", "5I2SlleZJOMUX9QbwYLUIAOshdrdpRcy");
            },
            success: function (data) {
                if (data.status == 'fail') {
                    if (data.msg == '用户未登录') {
                        window.location.href = "login.html";
                    } else {
                        alert(data.msg)
                    }

                } else if (data.status == 'success') {
                    current_elem.text(data.msg)
                }
            },
        });
    }

    $('.collectionbtn').on('click', function () {
        add_fav($(this), 1, 2);
    });

    $(function () {
        var $precision = $('.precision'),
            score = $precision.attr('data-star-scope'),
            option = {
                half: true,
                path: '/static/images/',
                precision: true,
                size: 24,
                starOff: 'g_star.png',
                starOn: 'r_star.png',
                starHalf: 'h_star.png',
                hints: ['极差', '差', '一般', '好评', '非常满意'],
                noRatedMsg: '暂时还未获得评价！',
                readOnly: true,
                score: score
            };
        $precision.raty(option);

        $('.jsFavBtn').on('click', function () {
            var type = $(this).attr('data-fav-type');
            if (type == '1') {
                favPraise($(this), 'fav', 1, '收藏');

            } else if (type == '3') {
                favPraise($(this), 'fav', 3);

            } else if (type == '11') {
                favPraise($(this), 'pra', 1);

            } else if (type == '4') {
                favPraise($(this), 'fav', 4);

            }
        });
    })
</script>


<script type="text/javascript">
    $(function () {
        $('.recordbtn1').click(function () {
            $('.recordbox1').show();
        });
        $('.recordbtn2').click(function () {
            $('.recordbox2').show();
        });

        $('.imgslide').unslider({
            speed: 500,               //  The speed to animate each slide (in milliseconds)
            delay: 3000,              //  The delay between slide animations (in milliseconds)
            complete: function () {
            },  //  A function that gets called after every slide animation
            keys: true,               //  Enable keyboard (left, right) arrow shortcuts
            dots: true,               //  Display dot navigation
            fluid: false              //  Support responsive design. May break non-responsive designs
        });
        var unslider = $('.imgslide').unslider();
        $('.unslider-arrow').click(function () {
            var fn = this.className.split(' ')[1];
            unslider.data('unslider')[fn]();
        });
    });


    function getAllBroadcast(obj, choise) {
        $(obj).parent().children().each(function () {
            $(this).removeClass("active2");
        })
        $(obj).addClass("active2");



            $.ajax({
                url:"/broadcast/getBroadcastByIdByPage",
                type:"post",
                dataType:"json",
                data:{
                    teacherId:[[${session.teacher.teacherId}]]
                    ,choise:choise
                },
                success:function (data) {
                   console.log(data)
                }
            })


    }

</script>

<script src="/static/layui/layui.js" charset="utf-8"></script>
<script>

    $(".h_log").click(function () {
        layer.open({
            type: 2,
            title: '',
            area: ['400px', '450px'],
            //					skin: 'layui-layer-rim', //加上边框
            content: '',
            resize: false,
        });
    })


    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });

    layui.use('table', function(){
        var table = layui.table;
        //监听表格复选框选择
        table.on('checkbox(demo)', function(obj){
            console.log(obj)
        });
        //监听工具条
        table.on('tool(demo)', function(obj){
            var data = obj.data;
            if(obj.event === 'detail'){
                layer.msg('ID：'+ data.id + ' 的查看操作');
            } else if(obj.event === 'del'){
                layer.confirm('真的删除行么', function(index){
                    obj.del();
                    layer.close(index);
                });
            } else if(obj.event === 'edit'){
                layer.alert('编辑行：<br>'+ JSON.stringify(data))
            }
        });

        var $ = layui.$, active = {
            getCheckData: function(){ //获取选中数据
                var checkStatus = table.checkStatus('idTest')
                    ,data = checkStatus.data;
                layer.alert(JSON.stringify(data));
            }
            ,getCheckLength: function(){ //获取选中数目
                var checkStatus = table.checkStatus('idTest')
                    ,data = checkStatus.data;
                layer.msg('选中了：'+ data.length + ' 个');
            }
            ,isAll: function(){ //验证是否全选
                var checkStatus = table.checkStatus('idTest');
                layer.msg(checkStatus.isAll ? '全选': '未全选')
            }
        };

        $('.demoTable .layui-btn').on('click', function(){
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
    });
</script>

</body>
</html>
